<div ms-controller="function_role">
    <div class="location_box">
        <div class="return_title">
            <a class="return_button" ms-click="history"><img src="../img/icon_return.png"/></a>
            <a ms-click="load('home_cloud.html')">首页</a>
            <span>&gt;</span>
            <span>系统管理</span>
            <span>&gt;</span>
            <span>角色权限</span>
        </div>
        <div class="button_box">
            <a class="button_save" ms-on-click="save">保存</a>
        </div>
    </div>
    <div class="clear">
        <div class="condition_box clear" ms-controller="role_list">
            <div class="role" ms-repeat="roleList"><label ms-on-click="changeRole(el.id,this)">{{el.name}}</label><div class="roleDelete" ms-controller="role_list" ms-on-click="removeItem(el.id)"></div> </div>
        </div>
    </div>
    <div class="table_content">
        <table ms-controller="paging" class="tableRole">
            <thead>
            <tr>
                <td width="15%">模块名称</td>
                <td width="85%">功能选择</td>
            </tr>
            </thead>
            <tbody>
                <tr ms-repeat="moduleList">
                    <td>{{el.name}}</td>
                    <td>
                        <!--<label ms-repeat="el.functionRoleList">
                            <input name="functionCheckBox" type="checkbox" ms-attr-value="el.functionId" ms-duplex-checked="el.pass"/>{{el.functionName}}
                        </label>-->
                        <div class="functionListBox clear">
                           <div class="functionList noSelect" ms-repeat="el.functionRoleList">
                               <input type="checkbox" name="functionCheckBox" ms-attr-value="el.functionId" ms-duplex-checked="el.pass" ms-attr-id="function_{{el.functionId}}" ms-on-change="checkAddUser()" /><label ms-attr-for="function_{{el.functionId}}">{{el.functionName}}</label>
                           </div>
                        </div>
                       <!-- <div ms-if="el.id==1&&addUserChecked==1">
                            <span>新增用户时可选择的用户角色</span>
                            <span ms-controller="role_list" ms-repeat="addUserRoleList" >
                                <input  type="checkbox" name="addUserRoleList" ms-attr-value="el.roleId" ms-attr-id="role_{{el.roleId}}" ms-duplex-checked="el.pass"/><label  ms-attr-for="role_{{el.roleId}}">{{el.roleName}}</label>
                            </span>
                        </div>-->
                        <div class="functionListBox clear" ms-if="el.id==1&&addUserChecked==1">
                            <div class="functionList noSelect"><span>新增用户时可选择的用户角色</span></div>
                            <div class="functionList noSelect" ms-controller="role_list" ms-repeat="addUserRoleList">
                                <input type="checkbox" name="addUserRoleList" ms-attr-value="el.roleId" ms-attr-id="role_{{el.roleId}}" ms-duplex-checked="el.pass"/><label ms-attr-for="role_{{el.roleId}}">{{el.roleName}}</label>
                            </div>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
